Dimen Density
EN A Stable class that allows defining custom dimensions based on screen qualifiers (UiModeType, Width, Height, Smallest Width).
The Dp value is resolved at composition (Compose) and uses the base value or a custom value, applying dynamic scaling at the end.
PT Classe Stable que permite a definição de dimensões customizadas baseadas em qualificadores de tela (UiModeType, Largura, Altura, Smallest Width).
O valor Dp é resolvido na composição (Compose) e usa o valor base ou um valor customizado, aplicando o dimensionamento dinâmico no final.
Constructors
Properties
Functions
EN Allow applying aspect ratio based constraint scaling. PT Permite aplicar o redimensionamento baseado na proporção da tela.
EN Allow ignoring the constraint scaling based on multi-window resizing properties. PT Permite ignorar o dimensionamento para os layouts de múltiplas janelas (divisão de tela).
EN Adds a new entry and re-sorts the list. Sorting is crucial: first by priority (ascending), and then by dpQualifierEntry.value (descending) so that larger qualifiers (e.g., sw600dp) are checked before smaller qualifiers (e.g., sw320dp).
EN Resolves the final dimension. This is the Composable part that reads the current configuration and decides which Dp to use.
EN Priority 4: Orientation. This is an overload that accepts an Int for customValue.
EN Priority 2: UiModeType qualifier (e.g., TELEVISION, WATCH).
EN Priority 2: UiModeType qualifier (e.g., TELEVISION, WATCH). This is an overload that accepts an Int for customValue.
EN Priority 3: Dp qualifier (sw, h, w) without UiModeType restriction.
EN Priority 3: Dp qualifier (sw, h, w) without UiModeType restriction. This is an overload that accepts an Int for customValue.
EN Priority 1: Most specific qualifier - Combines UiModeType AND Dp Qualifier (sw, h, w).
EN Priority 1: Most specific qualifier - Combines UiModeType AND Dp Qualifier (sw, h, w). This is an overload that accepts an Int for customValue.